package com.journey.org.ui.knowledge.gankio.detail

import android.app.Application
import androidx.databinding.ObservableField
import androidx.lifecycle.viewModelScope
import com.journey.org.entity.GankArticleDetailEntity
import com.mvvmhabit.org.base.BaseViewModel
import com.mvvmhabit.org.binding.command.BindingAction
import com.mvvmhabit.org.binding.command.BindingCommand
import com.mvvmhabit.org.bus.event.SingleLiveEvent
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

class GankDetailViewModel(application: Application) : BaseViewModel(application) {

    val onGankDetailField = ObservableField<GankArticleDetailEntity>()

    val onGankDetailContentEvent = SingleLiveEvent<String>()

    val onFinishCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
            finish()
        }
    })

    fun loadGankArticleDetail(id: String) {
        viewModelScope.launch(Dispatchers.Main) {

        }

    }


}